import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class Utils {
  static void showToast(String msg, {bool showTimeLong = false, bool error = false}) {
    Fluttertoast.showToast(
        msg: msg,
        toastLength: showTimeLong ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT,
        gravity: ToastGravity.BOTTOM,
        backgroundColor: error ? Colors.red : Color(0xFF3F51B5),
        textColor: Colors.white);
  }
}
